/**
 * 用户信息管理接口
 */
/* eslint-disable */
import request from '@/utils/request'

const api_url = '/system/user'

/**
 * 条件分页查询
 * @param currentPage 当前页
 * @param pageSize 当前页页面显示的数量
 * @param searchCondition 搜索条件
 * @returns {*}
 */
export function getUserPageListApi (currentPage, pageSize, searchCondition) {
  return request({
    url: `${api_url}/page/${currentPage}/${pageSize}`,
    method: 'post',
    //参数
    data: searchCondition
  })
}

/**
 * 保存新角色
 * @param user
 * @returns {*}
 */
export function saveNewUserApi (user) {
  return request({
    url: `${api_url}/save`,
    method: 'post',
    //参数
    data: user
  })
}

/**
 * 逻辑删除
 * @param id
 * @returns {*}
 */
export function deleteUserApi (id) {
  return request({
    url: `${api_url}/remove/${id}`,
    method: 'delete',
  })
}

/**
 * 根据id批量删除
 * @param ids id列表
 * @returns {*}
 */
export function batchDeleteUserApi (ids) {
  return request({
    url: `${api_url}/batchRemove`,
    method: 'delete',
    data: ids
  })
}

/**
 * 根据id查询单个用户
 * @param id
 * @returns {*}
 */
export function getSingleUserApi (id) {
  return request({
    url: `${api_url}/get/${id}`,
    method: 'get',
  })
}



